<form action="<?php echo $aUrl; ?>" method="post" name="adminForm">

<!-- start search-box -->
<table> 
<tr> 
	<td align="left" width="100%"> 
		关键字: 
		<input type="text" name="search" class="text_area" value="<?php echo $search; ?>" /> 
		<button onclick="setHide('pageno', '1');this.form.submit();">查询</button>
		<button onclick="clearText('search');this.form.submit();">重置</button> 
	</td> 
	<td nowrap="nowrap">
		<select name="category_id" class="inputbox" size="1" onchange="this.form.submit();">
			<option value="0">- 选择类别 -</option>
			<?php echo $categories; ?>
		</select>
		<select name="order_by" class="inputbox" size="1" onchange="this.form.submit();">
			<option value="">- 排序字段 -</option>
			<option value="dt_created" <?php if ($order_by == 'dt_created') echo 'selected'; ?>>发表时间</option>
			<option value="access_count" <?php if ($order_by == 'access_count') echo 'selected'; ?>>访问次数</option>
			<option value="dt_modify" <?php if ($order_by == 'dt_modify') echo 'selected'; ?>>修改时间</option>
		</select>
		<select name="post_flags" class="inputbox" size="1" onchange="this.form.submit();">
			<option value="">- 选择标签 -</option>
			<option value="h" <?php if ($post_flags == 'h') echo 'selected'; ?>>头条(h)</option>
			<option value="c" <?php if ($post_flags == 'c') echo 'selected'; ?>>推荐(c)</option>
			<option value="j" <?php if ($post_flags == 'j') echo 'selected'; ?>>跳转(j)</option>
		</select>
		<?php if (CControllerConfig::getAction() == 'list') : ?>
		<select name="post_status" class="inputbox" size="1" onchange="this.form.submit();">
			<option value="">- 选择状态 -</option>
			<option value="o" <?php if ($post_status == 'o') echo 'selected'; ?>>开放浏览</option>
			<option value="c" <?php if ($post_status == 'c') echo 'selected'; ?>>待审核</option>
		</select> 
		<?php endif; ?>
	</td> 
</tr> 
</table> 
<!-- end search-box -->

<table class="adminlist" cellspacing="1"> 
<thead> 
<tr> 
	<th width="20">#</th> 
	<th width="20"><input type="checkbox" name="toggle" value="post_ids[]" /></th> 
	<th class="title">
		<a href="javascript:void();">文档名称</a>
	</th> 
	<th width="7%" nowrap="nowrap"> 
		<a href="javascript:void();">所属类别</a>
	</th>
	<th width="7%" nowrap="nowrap"> 
		<a href="javascript:void();">文档作者</a>
	</th>
	<th width="7%" nowrap="nowrap"> 
		<a href="javascript:void();">静态页面</a>
	</th> 
	<th width="3%" nowrap="nowrap"> 
		<a href="javascript:void();">状态</a>
	</th> 
	<th width="3%" nowrap="nowrap"> 
		<a title="点击以便按本栏进行排序" href="javascript:changeOrderWay('access_count');">
			访问次数
			<?php if ($order_by === 'access_count') : ?>
			<img src="<?php echo $adminPath; ?>/images/system/sort_<?php echo $order_way; ?>.png" alt="<?php echo $order_way; ?>" />
			<?php endif; ?>
		</a>
	</th> 
	<th width="10%" nowrap="nowrap"> 
		<a title="点击以便按本栏进行排序" href="javascript:changeOrderWay('dt_created');">
			发表时间
			<?php if ($order_by === 'dt_created') : ?>
			<img src="<?php echo $adminPath; ?>/images/system/sort_<?php echo $order_way; ?>.png" alt="<?php echo $order_way; ?>" />
			<?php endif; ?>
		</a>
	</th> 
	<th width="10%" nowrap="nowrap"> 
		<a title="点击以便按本栏进行排序" href="javascript:changeOrderWay('dt_modify');">
			修改时间
			<?php if ($order_by === 'dt_modify') : ?>
			<img src="<?php echo $adminPath; ?>/images/system/sort_<?php echo $order_way; ?>.png" alt="<?php echo $order_way; ?>" />
			<?php endif; ?>
		</a>
	</th> 
	<th width="1%" nowrap="nowrap"> 
		<a href="javascript:void();">ID</a>
	</th> 
	<th width="21%" nowrap="nowrap"> 
		<a href="javascript:void();">操作</a>	
	</th> 
</tr> 
</thead>

<tfoot> 
<?php $this->display('common/pagination.phtml'); ?>
</tfoot> 

<tbody>
<?php foreach ($models as $key => $model) : ?>
<tr class="row<?php echo ($key%2); ?>"> 
	<td align="right"><?php echo ($key+1); ?></td> 
	<td align="center">
		<input type="checkbox" name="post_ids[]" value="<?php echo $model->post_id; ?>" />
	</td> 
	<td> 
		<span class="editlinktip hasTip" title="点击编辑该模块::Logged in Posts"> 
			<a href="#"><?php echo $model->post_title; ?></a> 
		</span> 
	</td> 
	<td align="center"><?php echo $model->Categories->category_name; ?></td> 
	<td align="center"><?php echo $model->Users->user_loginname; ?></td>
	<td align="center"><?php echo $model->is_html == 'y' ? '已生成' : '仅动态'; ?></td> 
	<td align="center"> 
		<?php if ($model->post_status == 'o') : ?>
		<a href="javascript:edit('c', <?php echo $model->post_id; ?>);" title="修改为待审核"> 
			<img src="<?php echo $adminPath; ?>/images/system/publish_g.png" border="0" alt="修改为待审核" />
		</a>
		<?php elseif ($model->post_status == 'c') : ?>
		<a href="javascript:edit('o', <?php echo $model->post_id; ?>);" title="修改为开放浏览"> 
			<img src="<?php echo $adminPath; ?>/images/system/publish_r.png" border="0" alt="修改为开放浏览" />
		</a>
		<?php else : ?>
		<img src="<?php echo $adminPath; ?>/images/system/publish_x.png" border="0" alt="修改为开放浏览" />
		<?php endif; ?>
	</td> 
	<td align="center"><?php echo $model->access_count; ?></td> 
	<td align="center"><?php echo $model->dt_created; ?></td> 
	<td align="center"><?php echo $model->dt_modify; ?></td> 
	<td align="center"><?php echo $model->post_id; ?></td> 
	<td align="center">
		<?php if (CControllerConfig::getAction() == 'list') : ?>
		<a href="#">预览</a> | 
		<a href="<?php echo CRequest::getInstance()->createUrl(array('id' => $model->post_id), 'edit'); ?>">修改</a> | 
		<a href="javascript:edit('t', <?php echo $model->post_id; ?>);">放入回收站</a> | 
		<a href="#">评论列表</a> | 
		<?php else : ?>
		<a href="javascript:edit('o', <?php echo $model->post_id; ?>);">开放浏览</a> | 
		<a href="javascript:edit('c', <?php echo $model->post_id; ?>);">待审核</a> | 
		<?php endif; ?>
		<a href="javascript:edit('delete', <?php echo $model->post_id; ?>);">彻底删除</a>
	</td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
<input type="hidden" name="order_way" value="<?php echo $order_way; ?>" /> 
<input type="hidden" name="post_id" value="0" /> 
<input type="hidden" name="do" value="" /> 
</form>